<?php
class Wmp_Form_ressetPasswordForm extends Zend_Form
{
    public function init()
    {        
    	$decorators = array(
            array('ViewHelper'), 
            array('Description'),
            array('Errors'),
            array('Label', array('separator'=>' ', 'requiredSuffix' => ' *', 'class' => 'lefty')),
            array('HtmlTag', array('tag' => 'li')),
        );    	
        
        $this->addElementPrefixPath('Wmp_Validate', 'Wmp/Validate/', 'validate');
        
        $email = $this->addElement('text', 'email', 
            array('label' => 'Email Address', 'size' => '30'))->email;
        $email->setRequired(true);
        $email->addValidator('emailAddress');
        $email->getValidator('emailAddress')->setMessage('That email is not correct');        
        $email->addValidator('FieldValueExist', false, 
                    array('id','email','id','Users'));
        $email->getValidator('FieldValueExist')->setMessage('That email is not exist');
        $email->setDecorators($decorators); 
		
        $ressetpwd = $this->addElement('submit', 'ressetpwd', array(
            'required' => false,
            'ignore'   => true,
            'label'    => 'Resset',
        ));

        // We want to display a 'failed authentication' message if necessary;
        // we'll do that with the form 'description', so we need to add that
        // decorator.
        $this->setDecorators(array(
            'FormElements',
            array('HtmlTag', array('tag' => 'dl', 'class' => 'zend_form')),
            array('Description', array('placement' => 'prepend')),
            'Form'
        ));
    }
}